package basicTypes;

import java.sql.SQLException;

import visitor.Visitor;

/**
 * Adapter para SQLException
 * Para permitir o uso do visitor
 * @author Duh
 *
 */
public class RAAdaptiveException extends SQLException {
	private SQLException exception;

	public RAAdaptiveException(SQLException e) {
		exception=e;
	}
	public int getCode() {
		return exception.getErrorCode();
	}
	public String getMessage() {
		return exception.getMessage();
	}
	
	public RAException accept(Visitor v) {
		return v.visit(this);
	}
	
	public SQLException getException() {
		return this.exception;
	}
}
